﻿/**
 * @author sminutoli
 * version 1.0
 * version 1.1
 * le agregué un setSize para que resuelva el re-escalado
 * 
 */
class com.dinmax.flash.central.draw.ButtonCentralNormal extends MovieClip 
implements com.dinmax.flash.draw.control.button.PressButtonBridge {
	
	//framenumbers
	public static var NORMAL:Number = 1;
	public static var OVER:Number = 2;
	public static var PRESS:Number = 2;
	//
	
	//padding
	public static var PADDING:Number = 5;
	//
	
	//variables que están en el dibujo
	private var txt_label:TextField;
	private var mcBase:MovieClip;
	//
	
	function onLoad(){
		trace("BotonCentral.as | onLoad()");
	};
	
	public function setText(text:String):Void {
		//trace("ButtonCentralNormal.as | setText() | text= "+text);
		this.txt_label.antiAliasType="advanced";
		this.txt_label.gridFitType="pixel";
		this.txt_label.sharpness=0;
		this.txt_label.text=text;	
	};
	
	public function setDisabled():Void{
		this._alpha = 70;
		this.enabled = false;
	};
	public function setNormal():Void{
		this._alpha = 100;
		mcBase.gotoAndStop(NORMAL);
	};
	public function setHover():Void{
		this._alpha = 100;
		mcBase.gotoAndStop(OVER);
	};
	public function setPress():Void{
		this._alpha = 100;
		mcBase.gotoAndStop(PRESS);
	};
	public function setSize(width:Number, height:Number):Void{
		trace("ButtonCentralNormal.as | setSize()");
		trace("me hicieron un setSize man width= "+width+" height= "+height);
		trace("base oldW= "+mcBase._width+" oldH= "+mcBase._height);
		mcBase._width = width;
		mcBase._height = height;
		trace("base newW= "+mcBase._width+" newH= "+mcBase._height);
		trace("");
	};
		
};